package com.wandian.game
{		import com.dgphoenix.*;
		import com.dgphoenix.customer.*;
		import com.dgphoenix.objects.*;
		import flash.net.*;
		
		public class GameData extends Object
		{
			private var fWorkerGrogBonusTotalPayout_num:Number = 0;
			public var bonusPay:Number = 0;
			private var fFreeSpinsFeatureRequired_bl:Boolean;
			public var jackpot:Array;
			public var showButtonAutoSpin:Boolean = true;
			private var fErrorCode_str:String = "";
			private var fWorkerGrogBonusPayout_num:Number;
			public var matchPos:Array;
			private var fClickMePayouts_arr:Array;
			private var terminate:Boolean;
			public var initReels:Array;
			public var bBetDeduct:Boolean = false;
			private var finsoftUrl:String = "";
			public var winLines:Array;
			private var fSwordFightBonusRequired_bl:Boolean;
			private var message_type:String = "";
			private var fLasthandSwordFightBonusWinsHistory_bl_arr:Array;
			public var state:Number = 0;
			private var fIsFeature_bl:Boolean = false;
			public var payoutWild:Array;
			public var matchPay:Number = 0;
			private var fWorkerGrogBonusPlayerWin_bl:Boolean;
			public var bLastHand:Boolean = false;
			private var fWorkerGrogBonusLasthandWinsHistory_bl_arr:Array;
			public var stopReels:Array;
			private var _storedCoinValue:Number;
			public var ipayout3:Array;
			public var ipayout4:Array;
			public var ipayout5:Array;
			private var fBetSum_num:Number = 0;
			private var fBonusMode_bl:Boolean = false;
			public var freeSpin:Number = 0;
			public var bonusItems:Array;
			public var numSpin:Number = 0;
			public var clickMePos:Array;
			public var freeSpinPay:Number = 0;
			private var fResponseTime_num:Number;
			private var fWildReelRequired_bl:Boolean;
			private var nFreeRoundsCount:Number = 0;
			private var fWorkerGrogBonusRequired_bl:Boolean;
			public var nAutoSpin:Object = 0;
			private var fFreeRoundsMode_bl:Boolean = false;
			private var fBetController_bc:BetController;
			public var clickMePay:Number = 0;
			private var fTotalFreeSpinsPayout_num:Number;
			public var limitsChanged:Boolean = false;
			private var fHoldWildReelForTheNextSpin_bl:Boolean;
			public var payout:Array;
			private var fClickMeIconsPositions_arr:Array;
			public var bonusStones:Number = 0;
			private var fClickMeFeatureRequired_bl:Boolean;
			private var fBigWinPresentationPermissible_bl:Boolean;
			private var fNumberOfFreeSpins_num:Number;
			public var nSpin:Number = 0;
			public var bAutoState:Object = false;
			private var fSwordFightBonusPayouts_int_arr:Array;
			public static const FRB_CANCELLED:String = "FRB_CANCELLED";
			public static const BONUS_EXPIRED:String = "BONUS_EXPIRED";
			public static var STATE_BONUS_RESPONSE:Number = 101;
			public static const BONUS_BONUS_CANCELED:String = "BONUS_CANCELED";
			public static const FRB_FINISHED:String = "FRB_FINISHED";
			public static var STATE_FREESPIN_RESPONSE:Number = 5;
			public static var STATE_INIT:Number = 0;
			public static var STATE_ENTER:Number = 1;
			public static var STATE_RESULT:Number = 6;
			public static var STATE_PLACEBET_RESPONSE:Number = 4;
			public static var STATE_BONUS:Number = 100;
			private static var _instance:GameData;
			public static var STATE_ENTER_RESPONSE:Number = 2;
			public static var STATE_PLACEBET:Number = 3;
			public static var STATE_BONUS_START:Number = 102;
			public static const BONUS_RELEASED:String = "BONUS_RELEASED";
			
			public function GameData()
			{
				state = 0;
				bAutoState = false;
				nAutoSpin = 0;
				numSpin = 0;
				nSpin = 0;
				showButtonAutoSpin = true;
				bonusPay = 0;
				clickMePay = 0;
				freeSpinPay = 0;
				matchPay = 0;
				initReels = [];
				stopReels = [];
				payout = [];
				payoutWild = [];
				winLines = [];
				clickMePos = [];
				matchPos = [];
				bonusItems = [];
				ipayout3 = [];
				ipayout4 = [];
				ipayout5 = [];
				jackpot = [];
				freeSpin = 0;
				bLastHand = false;
				bonusStones = 0;
				limitsChanged = false;
				bBetDeduct = false;
				fClickMeIconsPositions_arr = [];
				fClickMePayouts_arr = [];
				fWorkerGrogBonusTotalPayout_num = 0;
				finsoftUrl = "";
				message_type = "";
				fBonusMode_bl = false;
				fFreeRoundsMode_bl = false;
				nFreeRoundsCount = 0;
				fErrorCode_str = "";
				fBetSum_num = 0;
				fIsFeature_bl = false;
				this.fBetController_bc = new BetController();
				randomReels();
				return;
			}// end function
			
			public function get defaultBetPerLine() : Number
			{
				return this.betController.defaultBetPerLineInCredits;
			}// end function
			
			public function set defaultBetPerLine(param1:Number) : void
			{
				this.betController.defaultBetPerLineInCredits = param1;
				return;
			}// end function
			
			public function set betCoins(param1:Number) : void
			{
				this.betController.betPerLineInCredits = param1;
				return;
			}// end function
			
			public function get errorCode() : String
			{
				return fErrorCode_str;
			}// end function
			
			public function set storedCoinValue(param1:Number) : void
			{
				_storedCoinValue = param1;
				return;
			}// end function
			
			public function get betCoins() : Number
			{
				return this.betController.betPerLineInCredits;
			}// end function
			
			public function setMessageType(param1:String) : void
			{
				message_type = param1;
				return;
			}// end function
			
			public function getTotalBet() : Number
			{
				return betCoins * selectedLines;
			}// end function
			
			public function set errorCode(param1:String) : void
			{
				fErrorCode_str = param1;
				return;
			}// end function
			
			public function get clickMePayouts() : Array
			{
				trace("GameData.clickMePayouts(): fClickMePayouts = " + this.fClickMePayouts_arr);
				return this.fClickMePayouts_arr;
			}// end function
			
			public function setTerminate(param1:Boolean) : void
			{
				terminate = param1;
				return;
			}// end function
			
			public function planDefaultBetPartially() : void
			{
				this.betController.planDefaultBetPartially();
				return;
			}// end function
			
			public function getWinIconsPayoutMultiplier(param1:Number, param2:Number) : Number
			{
				var _loc_3:Array = null;
				switch(param2)
				{
					case 3:
					{
						_loc_3 = this.ipayout3;
						break;
					}
					case 4:
					{
						_loc_3 = this.ipayout4;
						break;
					}
					case 5:
					{
						_loc_3 = this.ipayout5;
						break;
					}
					default:
					{
						return 0;
						break;
					}
				}
				if (param1 >= _loc_3.length)
				{
					return 0;
				}
				trace("GameData.getWinIconsPayoutMultiplier(): " + _loc_3[param1]);
				return _loc_3[param1];
			}// end function
			
			public function set defaultNumberOfLines(param1:Number) : void
			{
				this.betController.defaultNumberOfSelectedLines = param1;
				return;
			}// end function
			
			public function set selectedLines(param1:Number) : void
			{
				this.betController.numberOfSelectedLines = param1;
				return;
			}// end function
			
			public function get winIconsPayoutMultipliers() : Array
			{
				var _loc_1:Array = null;
				var _loc_2:int = 0;
				var _loc_3:Array = null;
				var _loc_4:Number = NaN;
				_loc_1 = new Array();
				while (_loc_2 < this.payableIconsCount)
				{
					
					_loc_3 = new Array();
					_loc_4 = 0;
					while (_loc_4 <= 5)
					{
						
						_loc_3.push(this.getWinIconsPayoutMultiplier(_loc_2, _loc_4));
						_loc_4 = _loc_4 + 1;
					}
					_loc_1.push(_loc_3);
					_loc_2++;
				}
				trace("GameData.winIconsPayoutMultipliers: " + _loc_1);
				return _loc_1;
			}// end function
			
			public function get workerGrogBonusLasthandWinsHistory() : Array
			{
				return this.fWorkerGrogBonusLasthandWinsHistory_bl_arr;
			}// end function
			
			public function get bonusMode() : Boolean
			{
				return fBonusMode_bl;
			}// end function
			
			public function get isFeature() : Boolean
			{
				return fIsFeature_bl;
			}// end function
			
			public function get swordFightBonusWinLines() : Array
			{
				var _loc_1:* = undefined;
				var _loc_2:Number = NaN;
				var _loc_3:OWinLine = null;
				_loc_1 = [];
				_loc_2 = 0;
				while (_loc_2 < payout.length)
				{
					
					if (payout[_loc_2] == -2)
					{
						_loc_3 = new OWinLine();
						_loc_3.id = _loc_2;
						_loc_3.payout = payout[_loc_2];
						_loc_1.push(_loc_3);
					}
					_loc_2 = _loc_2 + 1;
				}
				return _loc_1;
			}// end function
			
			public function getFinsoftUrl() : String
			{
				return finsoftUrl;
			}// end function
			
			public function get freeSpinsRemains() : Number
			{
				return this.fNumberOfFreeSpins_num;
			}// end function
			
			public function set defaultCoinId(param1:Number) : void
			{
				trace("GameData.setDefaultCoinId() called: aDefaultCoinId_num=" + param1);
				this.betController.defaultCoinId = param1;
				return;
			}// end function
			
			public function setFinsoftUrl(param1:String) : void
			{
				finsoftUrl = param1;
				return;
			}// end function
			
			private function randomReels() : void
			{
				var _loc_1:Number = NaN;
				trace("RANDOM_REELS = " + Const.REELS_COUNT);
				trace("RANDOM_REELS = " + Const.ICONS_COUNT);
				initReels = [];
				_loc_1 = 0;
				while (_loc_1 < Const.REELS_COUNT * Const.ICONS_COUNT)
				{
					
					initReels[_loc_1] = Math.floor(Math.random() * Const.ICONS_ALL);
					trace(initReels[_loc_1]);
					_loc_1 = _loc_1 + 1;
				}
				trace("[GameData] randomReels, ar = " + initReels);
				return;
			}// end function
			
			public function get freeSpinsFeatureRequired() : Boolean
			{
				return this.fFreeSpinsFeatureRequired_bl;
			}// end function
			
			public function get holdWildReelForTheNextSpin() : Boolean
			{
				return this.fHoldWildReelForTheNextSpin_bl;
			}// end function
			
			public function get workerGrogBonusWinLines() : Array
			{
				var _loc_1:* = undefined;
				var _loc_2:Number = NaN;
				var _loc_3:OWinLine = null;
				_loc_1 = [];
				_loc_2 = 0;
				while (_loc_2 < payout.length)
				{
					
					if (payout[_loc_2] == -1)
					{
						_loc_3 = new OWinLine();
						_loc_3.id = _loc_2;
						_loc_3.payout = payout[_loc_2];
						_loc_1.push(_loc_3);
					}
					_loc_2 = _loc_2 + 1;
				}
				return _loc_1;
			}// end function
			
			public function get swordFightBonusTotalPayout() : Number
			{
				var _loc_1:int = 0;
				var _loc_2:int = 0;
				_loc_1 = 0;
				_loc_2 = 0;
				while (_loc_2 < this.swordFightBonusActionsPayouts.length)
				{
					
					_loc_1 = _loc_1 + this.swordFightBonusActionsPayouts[_loc_2];
					_loc_2++;
				}
				return _loc_1;
			}// end function
			
			public function get responseTime() : Number
			{
				return fResponseTime_num;
			}// end function
			
			public function getCoinValue() : Number
			{
				return Const.COINS[selectedCoin];
			}// end function
			
			public function getMessageType() : String
			{
				return message_type;
			}// end function
			
			public function get featureRequired() : Boolean
			{
				return this.wildReelRequired || this.clickMeFeatureRequired || this.freeSpinsFeatureRequired || this.workerGrogBonusRequired || this.swordFightBonusRequired;
			}// end function
			
			public function get clickMeTotalPayout() : Number
			{
				var _loc_1:Number = NaN;
				var _loc_2:int = 0;
				if (!this.fClickMePayouts_arr)
				{
					return 0;
				}
				_loc_1 = 0;
				_loc_2 = 0;
				while (_loc_2 < clickMePayouts.length)
				{
					
					_loc_1 = _loc_1 + clickMePayouts[_loc_2];
					_loc_2++;
				}
				return _loc_1;
			}// end function
			
			public function planLasthandBetPartially() : void
			{
				this.betController.planLasthandBetPartially();
				return;
			}// end function
			
			public function planDefaultBet() : void
			{
				this.betController.planDefaultBet();
				return;
			}// end function
			
			public function set freeRoundsCount(param1:Number) : void
			{
				nFreeRoundsCount = param1;
				return;
			}// end function
			
			public function get isLasthandBet() : Boolean
			{
				return this.betController.isLasthandBet;
			}// end function
			
			public function get wildReelRequired() : Boolean
			{
				return this.fWildReelRequired_bl;
			}// end function
			
			public function set bonusMode(param1:Boolean) : void
			{
				fBonusMode_bl = param1;
				return;
			}// end function
			
			public function get lasthandBetPerLine() : Number
			{
				return this.betController.lasthandBetPerLineInCredits;
			}// end function
			
			public function get isLasthandBetAcceptable() : Boolean
			{
				return this.betController.isLasthandBetAcceptable;
			}// end function
			
			public function getTotalPayout() : Number
			{
				var _loc_1:Number = NaN;
				var _loc_2:Number = NaN;
				_loc_1 = 0;
				_loc_2 = 0;
				while (_loc_2 < payout.length)
				{
					
					if (payout[_loc_2] > 0)
					{
						_loc_1 = _loc_1 + payout[_loc_2];
					}
					_loc_2 = _loc_2 + 1;
				}
				return _loc_1;
			}// end function
			
			public function set isFeature(param1:Boolean) : void
			{
				trace("[isFeature]: aIsFeature_bl " + param1);
				fIsFeature_bl = param1;
				return;
			}// end function
			
			public function get balance() : Number
			{
				return this.betController.balance;
			}// end function
			
			public function get swordFightBonusActionsPayouts() : Array
			{
				return this.fSwordFightBonusPayouts_int_arr;
			}// end function
			
			public function set freeRoundsMode(param1:Boolean) : void
			{
				fFreeRoundsMode_bl = param1;
				return;
			}// end function
			
			public function get storedCoinValue() : Number
			{
				return _storedCoinValue;
			}// end function
			
			private function setWinLines() : void
			{
				var _loc_1:Array = null;
				var _loc_2:Number = NaN;
				var _loc_3:Number = NaN;
				var _loc_4:OWinLine = null;
				var _loc_5:Number = NaN;
				_loc_1 = [];
				_loc_2 = 0;
				winLines = [];
				_loc_3 = 0;
				while (_loc_3 < payout.length)
				{
					
					_loc_4 = new OWinLine();
					if (payout[_loc_3] > 0)
					{
						_loc_4.id = _loc_3;
						_loc_4.payout = payout[_loc_3];
						_loc_1.push(_loc_4);
					}
					_loc_3 = _loc_3 + 1;
				}
				if (_loc_1.length > 1)
				{
					_loc_5 = 1;
					while (_loc_5 < _loc_1.length)
					{
						
						if (_loc_1[_loc_2].payout < _loc_1[_loc_5].payout)
						{
							_loc_2 = _loc_5;
						}
						if (_loc_5 == (_loc_1.length - 1))
						{
							winLines.push(_loc_1[_loc_2]);
							_loc_1.splice(_loc_2, 1);
							_loc_2 = 0;
							_loc_5 = 0;
						}
						if (_loc_1.length == 1)
						{
							winLines.push(_loc_1[0]);
						}
						_loc_5 = _loc_5 + 1;
					}
				}
				else if (_loc_1.length == 1)
				{
					winLines.push(_loc_1[0]);
				}
				return;
			}// end function
			
			public function get standardGameWin() : Number
			{
				return this.getTotalPayout();
			}// end function
			
			public function get betController() : BetController
			{
				return this.fBetController_bc;
			}// end function
			
			public function get selectedLines() : Number
			{
				return this.betController.numberOfSelectedLines;
			}// end function
			
			public function getMatchLineId() : Number
			{
				var _loc_1:Number = NaN;
				_loc_1 = 0;
				while (_loc_1 < payout.length)
				{
					
					if (payout[_loc_1] == Const.PAYOUT_MATCH)
					{
						payout[_loc_1] = 0;
						return _loc_1;
					}
					_loc_1 = _loc_1 + 1;
				}
				return -1;
			}// end function
			
			public function get workerGrogBonusTotalPayout() : Number
			{
				return this.fWorkerGrogBonusTotalPayout_num;
			}// end function
			
			public function get defaultCoinId() : Number
			{
				return this.betController.defaultCoinId;
			}// end function
			
			public function get workerGrogBonusPlayerWins() : Boolean
			{
				return this.fWorkerGrogBonusPlayerWin_bl;
			}// end function
			
			public function set holdWildReelForTheNextSpin(param1:Boolean) : void
			{
				this.fHoldWildReelForTheNextSpin_bl = param1;
				return;
			}// end function
			
			public function get workerGrogBonusPayout() : Number
			{
				return this.fWorkerGrogBonusPayout_num;
			}// end function
			
			public function get defaultNumberOfLines() : Number
			{
				return this.betController.defaultNumberOfSelectedLines;
			}// end function
			
			public function get clickMeFeatureRequired() : Boolean
			{
				return this.fClickMeFeatureRequired_bl;
			}// end function
			
			public function get isDefaultBet() : Boolean
			{
				return this.betController.isDefaultBet;
			}// end function
			
			public function get freeRoundsCount() : Number
			{
				return nFreeRoundsCount;
			}// end function
			
			public function getCurrentJackpot() : Number
			{
				return jackpot[selectedCoin];
			}// end function
			
			public function set responseTime(param1:Number) : void
			{
				fResponseTime_num = param1;
				return;
			}// end function
			
			public function getBooleanByString(param1:String) : Boolean
			{
				var _loc_2:Boolean = false;
				_loc_2 = true;
				if (param1 == "false")
				{
					_loc_2 = false;
				}
				return _loc_2;
			}// end function
			
			public function set bigWinPresentationRequired(param1:Boolean) : void
			{
				this.fBigWinPresentationPermissible_bl = param1;
				return;
			}// end function
			
			public function get isDefaultBetAcceptable() : Boolean
			{
				return this.betController.isDefaultBetAcceptable;
			}// end function
			
			public function get isLastHand() : Boolean
			{
				return this.bLastHand;
			}// end function
			
			public function get freeSpinsPayout() : Number
			{
				return this.fTotalFreeSpinsPayout_num;
			}// end function
			
			public function get freeRoundsMode() : Boolean
			{
				return fFreeRoundsMode_bl;
			}// end function
			
			public function planLasthandBet() : void
			{
				this.betController.planLasthandBet();
				return;
			}// end function
			
			public function set wildReelRequired(param1:Boolean) : void
			{
				this.fWildReelRequired_bl = param1;
				return;
			}// end function
			
			public function get swordFightBonusRequired() : Boolean
			{
				return this.fSwordFightBonusRequired_bl;
			}// end function
			
			public function set lasthandBetPerLine(param1:Number) : void
			{
				trace("GameData.lasthandBetPerLine = " + param1);
				this.betController.lasthandBetPerLineInCredits = param1;
				return;
			}// end function
			
			public function set selectedCoin(param1:Number) : void
			{
				this.betController.coinId = param1;
				return;
			}// end function
			
			public function initZeroBet() : void
			{
				this.betController.coinId = 0;
				this.betController.numberOfSelectedLines = 0;
				this.betController.betPerLineInCredits = 0;
				return;
			}// end function
			
			public function getFreeSpinLineId() : Number
			{
				var _loc_1:Number = NaN;
				_loc_1 = 0;
				while (_loc_1 < payout.length)
				{
					
					if (payout[_loc_1] == Const.PAYOUT_FREESPIN)
					{
						payout[_loc_1] = 0;
						return _loc_1;
					}
					_loc_1 = _loc_1 + 1;
				}
				return -1;
			}// end function
			
			public function getTerminate() : Boolean
			{
				return terminate;
			}// end function
			
			public function updateParams(param1:URLVariables) : void
			{
				if (CustomerSpecification.getCustomerId() != CustomerSpecification.CUSTOMER_ID_FINSOFT && CustomerSpecification.getCustomerId() != CustomerSpecification.CUSTOMER_ID_RPK && CustomerSpecification.getCustomerId() != CustomerSpecification.CUSTOMER_ID_BETKLASS)
				{
					if (param1.server_type != null)
					{
						CustomerSpecification.setCustomerId(param1.server_type);
					}
				}
				if (param1.error_code != null)
				{
					errorCode = String(param1.error_code);
				}
				if (param1.time != null)
				{
					responseTime = Number(param1.time);
				}
				if (param1.betsum != null)
				{
					betSum = Number(param1.betsum);
				}
				if (param1.frb_mode != null)
				{
					freeRoundsMode = getBooleanByString(param1.frb_mode);
				}
				if (param1.free_rounds_count != null)
				{
					freeRoundsCount = Number(param1.free_rounds_count);
				}
				if (param1.bonus_mode != null)
				{
					bonusMode = getBooleanByString(param1.bonus_mode);
				}
				if (param1.message_type != null)
				{
					message_type = String(param1.message_type);
				}
				if (param1.terminate != null)
				{
					terminate = getBooleanByString(param1.terminate);
				}
				if (param1.balance != null)
				{
					balance = Number(param1.balance);
				}
				if (param1.ibetvalues)
				{
					this.betController.coinsDenominations = param1.ibetvalues;
					Const.COINS = param1.ibetvalues;
				}
				if (param1.stopReels != null)
				{
					stopReels = param1.stopReels;
				}
				if (param1.clickMePos != null)
				{
					clickMePos = param1.clickMePos;
				}
				if (param1.clickMePay != null)
				{
					clickMePay = param1.clickMePay;
				}
				if (param1.payout != null)
				{
					payout = param1.payout;
					setWinLines();
				}
				if (param1.payoutWild != null)
				{
					payoutWild = param1.payoutWild;
				}
				if (param1.ipayout3)
				{
					ipayout3 = param1.ipayout3;
				}
				if (param1.ipayout4)
				{
					ipayout4 = param1.ipayout4;
				}
				if (param1.ipayout5)
				{
					ipayout5 = param1.ipayout5;
				}
				if (param1.jackpot)
				{
					jackpot = param1.jackpot;
				}
				if (param1.freeSpin)
				{
					this.freeSpin = param1.freeSpin;
				}
				if (param1.freeSpinPay)
				{
					this.freeSpinPay = param1.freeSpinPay;
				}
				if (param1.matchPos)
				{
					this.matchPos = param1.matchPos;
				}
				if (param1.matchPay)
				{
					this.matchPay = param1.matchPay;
				}
				if (param1.bonusItems)
				{
					this.bonusItems = param1.bonusItems;
				}
				if (param1.bonusPay)
				{
					this.bonusPay = param1.bonusPay;
				}
				bLastHand = param1.lastHand;
				if (param1.lastHand)
				{
					this.lasthandBetPerLine = param1.betPerLine;
					this.lasthandCoinId = param1.coinId;
					this.lasthandNumberOfLines = param1.selectedLines;
					if (param1.initReels)
					{
						this.initReels = param1.initReels;
						this.stopReels = this.initReels;
					}
				}
				if (param1.fDefaultCoinId_num || param1.fDefaultCoinId_num == 0)
				{
					this.defaultCoinId = param1.fDefaultCoinId_num;
				}
				if (param1.fDefaultNumberOfLines_num)
				{
					this.defaultNumberOfLines = param1.fDefaultNumberOfLines_num;
				}
				if (param1.fDefaultBetPerLine_num)
				{
					this.defaultBetPerLine = param1.fDefaultBetPerLine_num;
				}
				if (param1.fWildReelRequired_bl)
				{
					this.wildReelRequired = true;
				}
				else
				{
					this.wildReelRequired = false;
				}
				if (param1.fHoldWildReelForTheNextSpin_bl)
				{
					this.holdWildReelForTheNextSpin = true;
					if (this.isLastHand)
					{
						this.wildReelRequired = true;
					}
				}
				else
				{
					this.holdWildReelForTheNextSpin = false;
				}
				if (param1.fClickMeFeatureRequired_bl)
				{
					trace("GameData.updateParams(): CLICK ME FEATURE REQUIRED");
					this.fClickMeFeatureRequired_bl = true;
					this.fClickMeIconsPositions_arr = param1.fClickMeIconsPositions_arr;
				}
				else
				{
					this.fClickMeFeatureRequired_bl = false;
				}
				if (param1.fClickMePayouts_arr)
				{
					this.fClickMePayouts_arr = param1.fClickMePayouts_arr;
				}
				else
				{
					this.fClickMePayouts_arr = null;
				}
				if (param1.fFreeSpinsFeatureRequired_bl)
				{
					this.fFreeSpinsFeatureRequired_bl = true;
					this.fNumberOfFreeSpins_num = param1.fNumberOfFreeSpins_num;
				}
				else
				{
					this.fFreeSpinsFeatureRequired_bl = false;
					this.fNumberOfFreeSpins_num = 0;
				}
				if (param1.fTotalFreeSpinsPayout_num)
				{
					this.fTotalFreeSpinsPayout_num = param1.fTotalFreeSpinsPayout_num;
				}
				else
				{
					this.fTotalFreeSpinsPayout_num = 0;
				}
				if (param1.fWorkerGrogBonusRequired_bl)
				{
					this.fWorkerGrogBonusRequired_bl = true;
				}
				else
				{
					this.fWorkerGrogBonusRequired_bl = false;
				}
				if (param1.fWorkerGrogBonusPlayerWins_bl)
				{
					this.fWorkerGrogBonusPlayerWin_bl = true;
				}
				else
				{
					this.fWorkerGrogBonusPlayerWin_bl = false;
				}
				if (param1.fWorkerGrogBonusWin_num)
				{
					this.fWorkerGrogBonusPayout_num = param1.fWorkerGrogBonusWin_num;
					this.fWorkerGrogBonusTotalPayout_num = this.fWorkerGrogBonusTotalPayout_num + this.fWorkerGrogBonusPayout_num;
				}
				else
				{
					this.fWorkerGrogBonusPayout_num = 0;
					this.fWorkerGrogBonusTotalPayout_num = 0;
				}
				if (param1.fLasthandWinsHistory_bl_arr)
				{
					this.fWorkerGrogBonusLasthandWinsHistory_bl_arr = param1.fLasthandWinsHistory_bl_arr;
				}
				else
				{
					this.fWorkerGrogBonusLasthandWinsHistory_bl_arr = null;
				}
				if (param1.fSwordFightBonusRequired_bl)
				{
					this.fSwordFightBonusRequired_bl = true;
				}
				else
				{
					this.fSwordFightBonusRequired_bl = false;
				}
				if (param1.fSwordFightBonusActionsPayouts_int_arr)
				{
					this.fSwordFightBonusPayouts_int_arr = param1.fSwordFightBonusActionsPayouts_int_arr;
				}
				else
				{
					this.fSwordFightBonusPayouts_int_arr = new Array();
				}
				if (param1.fLasthandSwordFightBonusWinsHistory_bl_arr)
				{
					this.fLasthandSwordFightBonusWinsHistory_bl_arr = param1.fLasthandSwordFightBonusWinsHistory_bl_arr;
				}
				else
				{
					this.fLasthandSwordFightBonusWinsHistory_bl_arr = null;
				}
				this.bigWinPresentationRequired = true;
				if (param1.limitsChanged)
				{
					limitsChanged = param1.limitsChanged;
				}
				return;
			}// end function
			
			public function set lasthandNumberOfLines(param1:Number) : void
			{
				trace("GameData.lasthandNumberOfLines = " + param1);
				this.betController.lasthandNumberOfSelectedLines = param1;
				return;
			}// end function
			
			public function applyPlanningBet() : void
			{
				this.betController.applyPlanningBet();
				return;
			}// end function
			
			public function get payableIconsCount() : Number
			{
				return Math.max(ipayout3.length, ipayout4.length, ipayout5.length);
			}// end function
			
			public function set balance(param1:Number) : void
			{
				this.betController.balance = param1;
				return;
			}// end function
			
			public function updateWildPayout() : void
			{
				payout = payoutWild;
				setWinLines();
				return;
			}// end function
			
			public function get bigWinPresentationRequired() : Boolean
			{
				return this.totalWin >= 1000 && this.fBigWinPresentationPermissible_bl && this.swordFightBonusTotalPayout == 0 && this.workerGrogBonusTotalPayout == 0;
			}// end function
			
			public function get workerGrogBonusRequired() : Boolean
			{
				return this.fWorkerGrogBonusRequired_bl;
			}// end function
			
			public function get swordFightBonusLasthandWinsHistory() : Array
			{
				return this.fLasthandSwordFightBonusWinsHistory_bl_arr;
			}// end function
			
			public function get selectedCoin() : Number
			{
				return this.betController.coinId;
			}// end function
			
			public function get lasthandNumberOfLines() : Number
			{
				return this.betController.lasthandNumberOfSelectedLines;
			}// end function
			
			public function get clickMeIconsPositions() : Array
			{
				return this.fClickMeIconsPositions_arr;
			}// end function
			
			public function set lasthandCoinId(param1:Number) : void
			{
				trace("GameData.lasthandCoinId = " + param1);
				this.betController.lasthandCoinId = param1;
				return;
			}// end function
			
			public function get defaultBetIsCurrentlyUsed() : Boolean
			{
				return this.betController.defaultBetIsUsed;
			}// end function
			
			public function get lasthandCoinId() : Number
			{
				return this.betController.lasthandCoinId;
			}// end function
			
			public function set betSum(param1:Number) : void
			{
				fBetSum_num = param1;
				return;
			}// end function
			
			public function get totalWin() : Number
			{
				var _loc_1:Number = NaN;
				_loc_1 = 0;
				if (this.freeSpinsPayout > 0)
				{
					_loc_1 = this.freeSpinsPayout;
					if (this.freeSpinsFeatureRequired && !GameDispatcher.getInstance().freeSpinsBonusInProgress)
					{
						_loc_1 = _loc_1 + this.standardGameWin;
					}
				}
				else if (this.clickMeTotalPayout > 0)
				{
					_loc_1 = this.clickMeTotalPayout + this.standardGameWin;
				}
				else if (this.workerGrogBonusTotalPayout > 0)
				{
					_loc_1 = this.workerGrogBonusTotalPayout + this.standardGameWin;
				}
				else if (this.swordFightBonusTotalPayout > 0)
				{
					_loc_1 = this.swordFightBonusTotalPayout + this.standardGameWin;
				}
				else
				{
					_loc_1 = this.standardGameWin;
				}
				return _loc_1;
			}// end function
			
			public function get betSum() : Number
			{
				return fBetSum_num;
			}// end function
			
			public function applyLasthandBet() : void
			{
				this.betController.applyLasthandBet();
				return;
			}// end function
			
			public function getBonusLineId() : Number
			{
				var _loc_1:Number = NaN;
				_loc_1 = 0;
				while (_loc_1 < payout.length)
				{
					
					if (payout[_loc_1] == Const.PAYOUT_BONUS)
					{
						payout[_loc_1] = 0;
						return _loc_1;
					}
					_loc_1 = _loc_1 + 1;
				}
				return -1;
			}// end function
			
			public static function getInstance() : GameData
			{
				if (_instance == null)
				{
					_instance = new GameData;
				}
				return _instance;
			}// end function
			
		}
	}
